#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import base64
import io
import json
import random
import sys

import h5py
from keras.models import model_from_json
import numpy as np
import PIL.Image

import utils


def create_cell(i, bitmap, tagcode, correct):
    cell = '                <div class="cell" style="animation-name: appear; animation-delay: %.1fs; animation-duration: 0.7s; \
animation-fill-mode: both; animation-iteration-count: 1;">\n' % (4.0+0.2*(i//4))

    # save bitmap as data uri
    im = PIL.Image.fromarray(np.squeeze(x, axis=0))
    buffer = io.BytesIO()
    im.save(buffer, format='png')
    cell += '                    <img alt="" src="data:image/png;base64,%s" />\n' % base64.b64encode(buffer.getvalue()).decode('ascii')

    cell += '                    <span style="animation-name: %s; animation-delay: %.1fs; animation-duration: 2s; \
animation-fill-mode: both; animation-iteration-count: 1;">%s</span>\n' % ('togreen' if correct else 'tored', random.uniform(6.0, 18.0), utils.tagcode_to_unicode(tagcode))

    cell += '                </div>\n'
    return cell


if len(sys.argv) != 4:
    print('Usage: %s subset_filepath model_filepath weights_filepath' % sys.argv[0])
    sys.exit(1)

subset_filepath = sys.argv[1]
model_filepath = sys.argv[2]
weights_filepath = sys.argv[3]

# load the model
with open(model_filepath) as f:
    d = json.load(f)
    model = model_from_json(json.dumps(d))

model.load_weights(weights_filepath)
model.compile(loss='categorical_crossentropy', optimizer='adadelta', metrics=['accuracy'])

# test the model and output results
with h5py.File(subset_filepath, 'r') as f1, open('results.html', 'wb') as f2:
    print('Evaluating the network on the test set...')
    score = model.evaluate(f1['tst/x'], f1['tst/y'], verbose=0)
    print('Test score:', score[0])
    print('Test accuracy:', score[1])

    print('Extracting some results...')
    f2.write(b'''\
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>results</title>
        <style>
            body {
                background: #D4C8B8;
                background-image: url();
                background-attachment: fixed;
                background-position: bottom left;
                background-repeat: no-repeat;
            }

            @font-face {
                font-family: GangOfThree;
                src: url(data:font/opentype;base64,AAEAAAALAIAAAwAwT1MvMkCdmMYAAAE4AAAAVmNtYXBe0q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QAABasAAAUAAAAFqwAABasAAAWrAAAFqwAABasAAAWrAAAFqwAABasAAAWrAAAFqwAABasAAAWrAAAFqwAABasAAAWrAAAFqwAABasAAAWrAAAFqwAABasAAAWrAAAFqwAABasAAAWrAAAFqwAABasAAAWrAAAFqwAABasAAAWrAAAFqwAABasAAAWrAAAFqwAABasAAAWrAAAFqwAABasAAAWrAAAFqwAABasAAAWrAAAFqwAABasAAAWrAAAF1QAABNUAAAgAAAAH6wAAB+sAAAfrAAAH6wAABNUAAATVAAAE1QAACCsAAAhrAAAHVQAABgAAAAYAAAAEQAAABUAAAATAAAAEFQAABAAAAAYAAAAF4QAAA40AAATVAAABgAAAAtUAAAcVAAAClgAABNUAAALWAAAC1gAABNUAAALWAAAFVgAABHMAAAXHAAAEAAAABccAAAQAAAAFVgAABHMAAAVWAAAEcwAABVYAAARzAAAGOQAABHMAAAY5AAAEcwAABjkAAARzAAAFxwAABHMAAAXHAAAEcwAAAjkAAAI5AAACOQAAAjkAAAI5AAACOQAAAjkAAAHHAAAEAAAAAccAAAVWAAAEAAAABAAAAARzAAABxwAABccAAARzAAAFyQAABHMAAAY5AAAEcwAABjkAAARzAAAFxwAAAqoAAAVWAAAEAAAABOMAAAI5AAAFxwAABHMAAAXHAAAEcwAABccAAARzAAAFxwAABHMAAAeNAAAFxwAABVYAAAQAAAABxwAABVYAAARzAAAIAAAABx0AAAY5AAAE4wAAAjkAAAeNAAAFxwAAB40AAAXHAAAHjQAABccAAAVWAAAEAAAAAccAAAKqAAAEcwAABM0AAAasAAAGrAAABqwAAAasAAACqgAAAqoAAAKqAAACqgAABVcAAAZGAAAGtAAAAxIAAAYyAAAG2AAABgUAAAHHAAAFVgAABVYAAAVYAAAFVgAABOMAAAXHAAACOQAABVYAAAVYAAAGqgAABccAAAUzAAAGOQAABccAAAVWAAAE8gAABOMAAAVWAAAFVgAABq8AAAX7AAACOQAABVYAAASgAAADkQAABHMAAAHHAAAEYAAABJoAAAQAAAADhwAABHMAAARzAAABxw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A8oDygPKA8oDygPKA8oDygPKA8oDygPKA8oDygPZg9mD5wPsg+yD7IPsg+yD7IP2BAAEAAQNhB2EKwQ7BEsESwRLBFAEVQRYhFwEXARcBFwEXARcBG0EbQRtBG0EbQRtBG0EbQRtBG0EfASKhJgEpoSzhLmEwITHhM2E2ITkhO+E+4UIhRSFGIUdhSOFI4UjhSOFI4UohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUohSiFKIUoh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zYJYWZpaTEwMDM3CWFmaWkxMDAzOAlhZmlpMTAwMzkJYWZpaTEwMDQwCWFmaWkxMDA0MQlhZmlpMTAwNDIJYWZpaTEwMDQzCWFmaWkxMDA0NAlhZmlpMTAwNDUJYWZpaTEwMDQ2CWFmaWkxMDA0NwlhZmlpMTAwNDgJYWZpaTEwMDQ5CWFmaWkxMDA2NQlhZmlpMTAwNjYJYWZpaTEwMDY3CWFmaWkxMDA2OAlhZmlpMTAwNjkJYWZpaTEwMDcwCWFmaWkxMDA3MglhZmlpMTAwNzMJYWZpaTEwMDc0CWFmaWkxMDA3NQlhZmlpMTAwNzYJYWZpaTEwMDc3CWFmaWkxMDA3OAlhZmlpMTAwNzkJYWZpaTEwMDgwCWFmaWkxMDA4MQlhZmlpMTAwODIJYWZpaTEwMDgzCWFmaWkxMDA4NAlhZmlpMTAwODUJYWZpaTEwMDg2CWFmaWkxMDA4NwlhZmlpMTAwODgJYWZpaTEwMDg5CWFmaWkxMDA5MAlhZmlpMTAwOTEJYWZpaTEwMDkyCWFmaWkxMDA5MwlhZmlpMTAwOTQJYWZpaTEwMDk1CWFmaWkxMDA5NglhZmlpMTAwOTcJYWZpaTEwMDcxCWFmaWkxMDA5OQlhZmlpMTAxMDAJYWZpaTEwMTAxCWFmaWkxMDEwMglhZmlpMTAxMDMJYWZpaTEwMTA0CWFmaWkxMDEwNQlhZmlpMTAxMDYJYWZpaTEwMTA3CWFmaWkxMDEwOAlhZmlpMTAxMDkJYWZpaTEwMTEwCWFmaWkxMDE5MwlhZmlpMTAwNTAJYWZpaTEwMDk4CWFmaWkwMDIwOAlhZmlpNjEzNTIAAAAAAf//AAI=);
            }

            @keyframes appear {
                0%   { opacity: 0; }
                100% { opacity: 1; }
            }
            @keyframes togreen {
                0%   { border-color: #000; }
                100% { border-color: #0C0; }
            }
            @keyframes tored {
                0%   { border-color: #000; }
                100% { border-color: #C00; }
            }

            /*
            #wrapper {
                background: #E5D9C7;
                box-shadow: 0px 0px 25px 0px rgba(0,0,0,0.75);
                display: table;
                margin: 3em auto;
                padding: 2em;

                animation-name: appear;
                animation-delay: 0.7s;
                animation-duration: 0.3s;
                animation-fill-mode: both;
                animation-iteration-count: 1;
            }
            */

            #title {
                color: #171412;
                display: block;
                font-family: GangOfThree;
                font-size: 68px;
                text-align: center;

                animation-name: appear;
                animation-delay: 2s;
                animation-duration: 0.3s;
                animation-fill-mode: both;
                animation-iteration-count: 1;
            }
            #subtitle {
                color: #171412;
                display: block;
                font-family: GangOfThree;
                font-size: 24px;
                text-align: center;

                animation-name: appear;
                animation-delay: 3s;
                animation-duration: 0.3s;
                animation-fill-mode: both;
                animation-iteration-count: 1;
            }

            #cells {
                display: table;
                margin: 0 auto;
            }

            .cell {
                background: #EEDFCC;
                border: 1px solid #592B1F;
                box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75);
                display: inline-block;
                padding: 1em;
                margin: 0.8em;
            }
            .cell:hover {
                box-shadow: 0px 0px 25px 5px rgba(77,143,172,1);
            }
            .cell img {
                border: 1px solid #592B1F;
                vertical-align: middle;
            }
            .cell span {
                border-bottom: 3px solid;
                font-size: 42px;
                margin-left: 0.2em;
                vertical-align: middle;
            }
        </style>
    </head>
    <body>
        <div id="wrapper">
            <span id="title">CLASSIFICATION RESULTS</span>
            <p>
            <span id="subtitle">ACCURACY: ''' + (b'%.5f' % score[1]) + b'''</span>
            <p>
            <div id="cells">
            \n''')

    for i in range(96):
        index = random.randint(0, 11947-1)
        x, y, t = f1['tst/x'][index], f1['tst/y'][index], f1['tst/t'][index][0]
        score = model.evaluate(np.expand_dims(x, axis=0), np.expand_dims(y, axis=0), verbose=0)
        f2.write(create_cell(i, x, t, score[1] == 1).encode('utf-8'))
        if (i+1)%4 == 0: f2.write(b'                <br>\n')

    f2.write(b'''\
            </div>
        </div>
    </body>
</html>''')
